//
//  NewJiesuanYanzhengmaViewController.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/22.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewJiesuanYanzhengmaViewController.h"
#import "JTCSM.h"
#import "MyDoubleLabelView.h"
#import "NewSecondYanZhengViewController.h"
@interface NewJiesuanYanzhengmaViewController ()<UITextFieldDelegate>
@property (nonatomic,strong) UITextField *textfield;
@property (nonatomic,strong) MyDoubleLabelView *mydoubleView;
@end

@implementation NewJiesuanYanzhengmaViewController
- (void)gotBack{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = NO;
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [df isRemoveTarbar:YES];
    self.navigationController.navigationBar.hidden = NO;
    self.view.backgroundColor =RGBACOLOR(241, 241, 241, 1);
    leftBarButtonItems_rightBarButtonItems *leftbtn = KCUSTOMNAVIGSTION_ALLOC;
    self.navigationItem.leftBarButtonItem = [leftbtn setBarButtonItemsImageName:@"fanhui.png" frame:KLeftBarButtonItemFrame_image target:self SEL:@selector(gotBack)];
    [self layoutSubviews];
}

- (void)layoutSubviews{
    
    self.mydoubleView = [[MyDoubleLabelView alloc]initWithFrame:CGRectMake(0, KagainChangeHeight, KCONTROLLERWith, 90) titleFontsize:14 titlecolor:[df colorWithHexString:@"999999" alpha:1] contentFontsize:21 contentcolor:[df colorWithHexString:@"333333" alpha:1]];
    [self.view addSubview:self.mydoubleView];
    [self.mydoubleView InsertSpacesetvalueWithModel:@{KDoubleLabelTitle:@"短信验证码将发送到您的手机上",KDoubleLabelContent:@"133 **** 0395"} changeLabelY:10];
    
    UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, KVIEW_Y(self.mydoubleView), KCONTROLLERWith, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view];
    
    CGFloat imageheight = 17;
    UIImageView *buttonImageV = [[UIImageView alloc]initWithFrame:CGRectMake(20, (view.LC_height-imageheight)/2, imageheight*5/4, imageheight)];
    buttonImageV.image = [UIImage imageNamed:@"验证码icon.png"];
    [view addSubview:buttonImageV];
    _textfield = [UITextField initWithframe:CGRectMake(KVIEW_X(buttonImageV)+16, 0, 239, view.LC_height) backgrandColor:nil placeholder:@"请输入验证码" textAlignment:NSTextAlignmentLeft font:14 texcolor:[df colorWithHexString:@"999999" alpha:1]];
    [view addSubview:_textfield];
    [_textfield addTarget:self  action:@selector(valueChanged:)  forControlEvents:UIControlEventAllEditingEvents];
    _textfield.delegate = self;
    CGFloat btnHeight = 30;
   UIButton *getKeyBtn = [UIButton initWithFrame:CGRectMake(KCONTROLLERWith-KBtnWidth-13,(view.LC_height-btnHeight)/2, KBtnWidth-5, btnHeight) backgrandColor:nil titleColor:RGBACOLOR(89, 89, 89, 1 ) title:@"获取验证码" titleFont:12];
    [getKeyBtn addTarget:self action:@selector(getToKey) forControlEvents:UIControlEventTouchUpInside];
    [view addSubview:getKeyBtn];
    [df layerWithView:getKeyBtn radius:15 width:1 color:KZhuTiRGB];
    
    UIButton *tijiaobutton = [UIButton buttonWithType:UIButtonTypeCustom];
    tijiaobutton.frame = CGRectMake(25, KVIEW_Y(view)+20, KCONTROLLERWith-40, 50);
    [tijiaobutton addTarget:self action:@selector(tijiao) forControlEvents:UIControlEventTouchUpInside];
    [df layerWithView:tijiaobutton radius:25 width:0 color:nil];
    tijiaobutton.backgroundColor = KZhuTiRGB;
    [tijiaobutton setTitleColor:RGBACOLOR(51, 51, 51, 1) forState:UIControlStateNormal];
    [tijiaobutton setTitle:@"下一步" forState:UIControlStateNormal];
    [self.view addSubview:tijiaobutton];
    
}
#pragma mark textfieldDelegate
- (void)valueChanged:(UITextField *)textfield{
    
}
- (void)getToKey{
    
}
- (void)tijiao{

    [self gotoNewSecondYanZhengViewController];
}
- (void)gotoNewSecondYanZhengViewController{
    NewSecondYanZhengViewController *vc = [[NewSecondYanZhengViewController alloc]init];
    vc.nameTitle = @"验证身份";
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
